package novel.mzx.com.activity;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

/**
 * 作为一个闪屏界面：当用户打开应用时会有两秒的间隔，用于连接数据库的等待时间操作
 * */

public class FirstActivity extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        new Handler().postDelayed(() -> {
            //do event
            startActivity(new Intent(FirstActivity.this, LoginActivity.class));//跳转到首页
            finish();
        }, 2 * 1000);
    }
}
